<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作者详情 - {{ author.name }}</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        h1 {
            color: #333;
        }
        .info-item {
            margin-bottom: 15px;
        }
        .info-label {
            font-weight: bold;
            display: inline-block;
            width: 100px;
        }
        .action-links {
            margin-top: 20px;
        }
        .action-links a {
            display: inline-block;
            padding: 8px 16px;
            margin-right: 10px;
            text-decoration: none;
            border-radius: 4px;
        }
        .edit-link {
            background-color: #2196F3;
            color: white;
        }
        .delete-link {
            background-color: #f44336;
            color: white;
        }
        .back-link {
            background-color: #9E9E9E;
            color: white;
        }
    </style>
</head>
<body>
    <h1>作者详情</h1>
    <div class="info-item">
        <span class="info-label">ID:</span>
        <span>{{ author.id }}</span>
    </div>
    <div class="info-item">
        <span class="info-label">姓名:</span>
        <span>{{ author.name }}</span>
    </div>
    <div class="info-item">
        <span class="info-label">简介:</span>
        <div>{{ author.bio|default:"未设置" }}</div>
    </div>
    <div class="info-item">
        <span class="info-label">出生日期:</span>
        <span>{{ author.birth_date|date:"Y-m-d"|default:"未设置" }}</span>
    </div>
    <div class="info-item">
        <span class="info-label">创建时间:</span>
        <span>{{ author.created_at|date:"Y-m-d H:i:s" }}</span>
    </div>
    <div class="info-item">
        <span class="info-label">更新时间:</span>
        <span>{{ author.updated_at|date:"Y-m-d H:i:s" }}</span>
    </div>
    <div class="action-links">
        <a href="{% url 'author_update' author.id %}" class="edit-link">编辑</a>
        <a href="{% url 'author_delete' author.id %}" class="delete-link">删除</a>
        <a href="{% url 'author_list' %}" class="back-link">返回列表</a>
    </div>
</body>
</html>
